//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.tl.satoken.domain.entity;

import java.io.Serializable;

public class RoomInfo implements Serializable {
    private final String roomId;
    private final int currentPlayers;
    private final int maxPlayers;
    private final MBTISquare mbtiSquare;

    public boolean isFull() {
        return this.currentPlayers >= this.maxPlayers;
    }

    public String getRoomId() {
        return this.roomId;
    }

    public int getCurrentPlayers() {
        return this.currentPlayers;
    }

    public int getMaxPlayers() {
        return this.maxPlayers;
    }

    public MBTISquare getMbtiSquare() {
        return this.mbtiSquare;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RoomInfo)) {
            return false;
        } else {
            RoomInfo other = (RoomInfo)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (this.getCurrentPlayers() != other.getCurrentPlayers()) {
                return false;
            } else if (this.getMaxPlayers() != other.getMaxPlayers()) {
                return false;
            } else {
                Object this$roomId = this.getRoomId();
                Object other$roomId = other.getRoomId();
                if (this$roomId == null) {
                    if (other$roomId != null) {
                        return false;
                    }
                } else if (!this$roomId.equals(other$roomId)) {
                    return false;
                }

                Object this$mbtiSquare = this.getMbtiSquare();
                Object other$mbtiSquare = other.getMbtiSquare();
                if (this$mbtiSquare == null) {
                    if (other$mbtiSquare != null) {
                        return false;
                    }
                } else if (!this$mbtiSquare.equals(other$mbtiSquare)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RoomInfo;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        result = result * 59 + this.getCurrentPlayers();
        result = result * 59 + this.getMaxPlayers();
        Object $roomId = this.getRoomId();
        result = result * 59 + ($roomId == null ? 43 : $roomId.hashCode());
        Object $mbtiSquare = this.getMbtiSquare();
        result = result * 59 + ($mbtiSquare == null ? 43 : $mbtiSquare.hashCode());
        return result;
    }

    public String toString() {
        String var10000 = this.getRoomId();
        return "RoomInfo(roomId=" + var10000 + ", currentPlayers=" + this.getCurrentPlayers() + ", maxPlayers=" + this.getMaxPlayers() + ", mbtiSquare=" + String.valueOf(this.getMbtiSquare()) + ")";
    }

    public RoomInfo(final String roomId, final int currentPlayers, final int maxPlayers, final MBTISquare mbtiSquare) {
        this.roomId = roomId;
        this.currentPlayers = currentPlayers;
        this.maxPlayers = maxPlayers;
        this.mbtiSquare = mbtiSquare;
    }
}
